function initOrderForm(){
	var form = new Ext.FormPanel({
        frame: true,
        labelAlign: 'right',
        labelWidth: 85,
        split:true,
        height:220,
        jsonSubmit:true,
        scrollable:true,
        autoScroll:true,
        title:'',
        region:'north',
        id:'orderForm',
        closable:true,
        waitMsgTarget: true,
        defaults:{
        	xtype:'textfield',
        	width:220
        },
        items: [
                {fieldLabel:'编号',name: 'id',xtype:'textfield', editable : false,width:220,readOnly:true},
                {fieldLabel:'父级',name: 'fid',xtype:'textfield', editable : false,hidden:true},
                
                {	fieldLabel: '名称',
                	name: 'name',
                	allowBlank:false,
                	editable:false,
                	width:220,
                	xtype:'textfield'
                },{	fieldLabel: '说明',
                	name: 'text',
                	allowBlank:false,
                	editable:false,
                	width:220,
                	xtype:'textfield'
                },
                {
                	fieldLabel: '界面',
                	name:'url',
                	width:220,
                	xtype:'textfield',
                },{
                	fieldLabel:'图标',
                	name:'iconCls',
                	xtype:'trigger',
                	triggerClass:'x-form-search-trigger',
                	onTriggerClick:function(e){
        				
        			}
                },
                
                {	fieldLabel: '状态',
                	hiddenName: 'flag',
                	name: 'flag',
                	allowBlank:false,
                	editable:false,
                	width:220,
                	xtype:'combo',
                	store : new Ext.data.ArrayStore({
            	        fields: [
            	 	            'SID',
            	 	            'TEXT'
            	 	        ],
            	 	        data: [
            	 	            ["1", '有效'],
            	                 ["-1", '无效']
            	             ]	
            	 	    }), 
       			 	triggerAction:'all',
                    displayField : 'TEXT',  
                    valueField : 'SID',  
                    mode : 'local', 
                    editable : false
                }],
        buttons:[{
        text:'更新',
        handler:function(b){
        	var detailForm=Ext.getCmp('detailForm');
        	var node=detailForm["cur_node"];
        	if(!node)return;
       	 var form=detailForm.getForm();
       	b.setDisabled(true);
       	
       	var url="./update/"+(node.leaf?"page":"group");
       	console.log(url);
       	form.submit({
			submitEmptyText: false,
  		    clientValidation: true,
  		    url: url,
  		    success: function(form, action) {
  		    	b.setDisabled(false);
  		    	reload(node.fid);
  		    	Ext.Msg.alert('提示', '更新成功！');
     		},
  		    failure: function(form, action) {
  		    	b.setDisabled(false);
  		    	reload(node.fid);
  		    	Ext.Msg.alert('提示', "更新失败");
  		    }
       	});
        }
    },{
        text: '重置',
        handler: function(){
        	var form=Ext.getCmp('detailForm').getForm();
          	 var textCtrl=form.findField("text");
          	textCtrl.setValue(textCtrl.originalValue);
          	 var flagCtrl=form.findField("flag");
          	flagCtrl.setValue(flagCtrl.originalValue);
          	 var urlCtrl=form.findField("url");
          	 urlCtrl.setValue(urlCtrl.originalValue);
        }
    }]
 });
	form["loadData"]=function(node){
		var attrs=node.attributes;
		form["cur_node"]=node.attributes;
		var detailForm=form.getForm();
		detailForm.items.each(function(item,index,length){
			var name=item.name;
			item.setValue(attrs[name]);
		});
	};
	return form;
}

function initEleGrid(){
	
}

function initEscGrid(){
	
	
}